<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{title}} - 图腾生命医学</title>
    <script src="/apps/js/baidu-tongji-mtx.js"></script>
    <link rel="stylesheet" href="/apps/css/bootstrap.min.css">
    <link rel="stylesheet" href="/apps/css/fontawesome-free-6.4.0-web/css/all.css">
    <style>
        .expert-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            object-fit: cover;
        }
        .agenda-item {
            border-left: 3px solid #007bff;
            padding-left: 1rem;
            margin-bottom: 1rem;
        }
        .material-item {
            transition: transform 0.2s;
        }
        .material-item:hover {
            transform: translateY(-2px);
        }
        .material-item .description {
            font-size: 0.9rem;
            color: #666;
            margin-bottom: 1rem;
        }
        .material-item .description p {
            margin-bottom: 0.5rem;
        }
        .contact-info {
            background-color: #f8f9fa;
            padding: 1.5rem;
            border-radius: 0.5rem;
            margin-bottom: 1rem;
        }
        .contact-content {
            font-size: 0.9rem;
            line-height: 1.6;
        }
        .contact-content p {
            margin-bottom: 0.5rem;
        }
    </style>
</head>
<body>
    <div class="container py-4">
        <div class="row mb-4">
            <div class="col-12">
                <a href="/apps/loyalty/conference/list" class="btn btn-secondary mb-3">
                    <i class="fas fa-arrow-left"></i> 返回会议列表
                </a>
                <h1 class="mb-4">{{conference.conference_name}}</h1>
            </div>
        </div>

        <div class="row">
            <div class="col-md-8">
                {{#if conference.cover_image}}
                <div class="card mb-4">
                    <img src="{{conference.cover_image}}" class="card-img-top" alt="{{conference.conference_name}}">
                </div>
                {{/if}}

                <div class="card mb-4">
                    <div class="card-header">
                        <h3 class="card-title">会议基本信息</h3>
                    </div>
                    <div class="card-body">
                        <dl class="row">
                            <dt class="col-sm-3">会议时间</dt>
                            <dd class="col-sm-9">{{conference.conference_date}} {{conference.conference_time}}</dd>

                            <dt class="col-sm-3">会议地点</dt>
                            <dd class="col-sm-9">{{conference.location}}</dd>

                            <dt class="col-sm-3">会议简介</dt>
                            <dd class="col-sm-9">{{conference.description}}</dd>

                            <dt class="col-sm-3">会议标签</dt>
                            <dd class="col-sm-9">
                                {{#each conference.tags}}
                                <span class="badge badge-light mr-2">{{this}}</span>
                                {{/each}}
                            </dd>
                        </dl>
                    </div>
                </div>

                <div class="card mb-4">
                    <div class="card-header">
                        <h3 class="card-title">会议日程</h3>
                    </div>
                    <div class="card-body">
                        {{#each conference.agenda}}
                        <div class="agenda-item">
                            <h5>{{time}}</h5>
                            <p class="mb-1">{{title}}</p>
                            <small class="text-muted">主讲人：{{speaker}}</small>
                        </div>
                        {{/each}}
                    </div>
                </div>

                {{#if conference.contacts}}
                <div class="card mt-4">
                    <div class="card-header">
                        <h3 class="card-title">联系方式</h3>
                    </div>
                    <div class="card-body">
                        {{#each conference.contacts}}
                        <div class="contact-info mb-4">
                            <h5 class="text-primary">{{contact_type}}</h5>
                            <h6 class="mb-2">{{contact_name}}</h6>
                            {{#if contact_description}}
                            <p class="text-muted mb-2">{{contact_description}}</p>
                            {{/if}}
                            <div class="contact-content mb-2">
                                {{{contact_content}}}
                            </div>
                            {{#if contact_url}}
                            <div class="text-center">
                                {{#if (eq contact_type "会务支持")}}
                                <img src="{{contact_url}}" alt="联系二维码" class="img-fluid" style="max-width: 200px;">
                                {{else}}
                                <a href="{{contact_url}}" class="btn btn-outline-primary" target="_blank">
                                    <i class="fas fa-external-link-alt"></i> 了解更多
                                </a>
                                {{/if}}
                            </div>
                            {{/if}}
                        </div>
                        {{#unless @last}}<hr>{{/unless}}
                        {{/each}}
                    </div>
                </div>
                {{/if}}

                <div class="card mt-4">
                    <div class="card-header">
                        <h3 class="card-title">会议资料</h3>
                    </div>
                    <div class="card-body">
                        <div class="row">
                            {{#each conference.materials}}
                            <div class="col-md-6 mb-3">
                                <div class="card material-item">
                                    <div class="card-body">
                                        <h5 class="card-title">{{title}}</h5>
                                        {{#if description}}
                                        <div class="mb-3">
                                            {{{description}}}
                                        </div>
                                        {{/if}}
                                        <p class="card-text">
                                            <small class="text-muted">
                                                类型：{{type}} | 大小：{{size}}
                                            </small>
                                        </p>
                                        <a href="{{url}}" target="_blank" class="btn btn-primary btn-block">
                                            <i class="fas fa-download"></i> 
                                            {{#if (eq type "pdf")}}
                                            查看文档
                                            {{else if (eq type "ppt")}}
                                            下载幻灯片
                                            {{else}}
                                            下载资料
                                            {{/if}}
                                        </a>
                                    </div>
                                </div>
                            </div>
                            {{/each}}
                        </div>
                    </div>
                </div>

            </div>

            <div class="col-md-4">
                <div class="card mb-4">
                    <div class="card-header">
                        <h3 class="card-title">演讲嘉宾</h3>
                    </div>
                    <div class="card-body">
                        {{#each conference.speakers}}
                        <div class="expert-info mb-4">
                            <div class="d-flex align-items-center mb-3">
                                {{#if avatar}}
                                <img src="{{avatar}}" class="expert-avatar mr-3" alt="{{name}}">
                                {{/if}}
                                <div>
                                    <h5 class="mb-1">{{name}}</h5>
                                    <p class="mb-0 text-muted">{{title}}</p>
                                </div>
                            </div>
                            <p class="mb-1"><strong>单位：</strong>{{hospital}}</p>
                            <p class="mb-1"><strong>主题：</strong>{{topic}}</p>
                            {{#if introduction}}
                            <p class="mb-0"><small class="text-muted">{{introduction}}</small></p>
                            {{/if}}
                        </div>
                        {{/each}}
                    </div>
                </div>

                {{#if conference.replay_url}}
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">会议回放</h3>
                    </div>
                    <div class="card-body">
                        <a href="{{conference.replay_url}}" target="_blank" class="btn btn-primary btn-lg btn-block">
                            <i class="fas fa-play"></i> 观看回放
                        </a>
                    </div>
                </div>
                {{/if}}
            </div>
        </div>
    </div>

    <script src="/apps/js/jquery.min.js"></script>
    <script src="/apps/js/bootstrap.bundle.min.js"></script>
</body>
</html> 
